package com.juc;
// volatile 可见性 不重排序


public class LocalJuc {

    static ThreadLocal<UserLocal> td = new ThreadLocal<>();

    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            td.set(new UserLocal());
            UserLocal user = td.get();
        });
    }
}

class UserLocal {
    public Integer age = 0;
}